import Vue from 'vue'
import VRouter from 'vue-router'

Vue.use(VRouter)

export default new VRouter({
  name: 'VueRouter',
  mode: 'history',
  routes: [
    {
      path: '/index.html',
      name: 'index',
      component: () => import('@/page/index')
    },
    {
      path: '/',
      redirect: '/index.html'
    },
    {
      path: "/list/:varstr(\\S+).html",
      name: 'list',
      component: () => import('@/page/list')
    },
    {
      path: '/pub.html',
      name: 'pub',
      component: () => import('@/page/pub')
    },
    {
      path: '/detail/:id(\\d+).html',
      name: 'detail',
      component: () => import('@/page/detail')
    },
    {
      path: '/user/center/index.html',
      name: 'my',
      component: () => import('@/page/my')
    },
  ]
})
